using System.ComponentModel.DataAnnotations;

namespace SupplierCustomerManagement.Domain.Entities
{
    /// <summary>
    /// 供应商实体
    /// 代表系统中的供应商信息，包含供应商的基本信息、联系信息、地址信息、资质信息等
    /// </summary>
    public class Supplier : BaseEntity
    {
        /// <summary>
        /// 供应商编号
        /// </summary>
        [Required]
        [StringLength(50)]
        public string SupplierCode { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        [Required]
        [StringLength(200)]
        public string SupplierName { get; set; }

        /// <summary>
        /// 供应商类型（个人/企业）
        /// </summary>
        [Required]
        [StringLength(20)]
        public string SupplierType { get; set; }

        /// <summary>
        /// 负责人电话
        /// </summary>
        [StringLength(50)]
        public string? ContactPhone { get; set; }

        /// <summary>
        /// 录入单位
        /// </summary>
        [Required]
        [StringLength(100)]
        public string EntryUnit { get; set; }

        /// <summary>
        /// 使用单位
        /// </summary>
        [Required]
        [StringLength(100)]
        public string UsageUnit { get; set; }

        /// <summary>
        /// 所属市场
        /// </summary>
        [StringLength(100)]
        public string? AffiliatedMarket { get; set; }

        /// <summary>
        /// 服务人员
        /// </summary>
        [StringLength(100)]
        public string? ServicePersonnel { get; set; }

        /// <summary>
        /// 归档状态
        /// </summary>
        public bool IsArchived { get; set; } = false;

        /// <summary>
        /// 使用状态（启用/停用）
        /// </summary>
        [Required]
        [StringLength(20)]
        public string Status { get; set; } = "启用";

        /// <summary>
        /// 修改人
        /// </summary>
        [StringLength(100)]
        public string? ModifiedBy { get; set; }

        /// <summary>
        /// 最后修改时间
        /// </summary>
        public DateTime? LastModifiedTime { get; set; }

        /// <summary>
        /// 负责人姓名
        /// </summary>
        [StringLength(100)]
        public string? ContactPersonName { get; set; }

        /// <summary>
        /// 身份证号（个人供应商）
        /// </summary>
        [StringLength(18)]
        public string? IdCard { get; set; }

        /// <summary>
        /// 统一社会信用代码（企业供应商）
        /// </summary>
        [StringLength(18)]
        public string? UnifiedSocialCreditCode { get; set; }

        /// <summary>
        /// 所属行业
        /// </summary>
        [StringLength(100)]
        public string? Industry { get; set; }

        /// <summary>
        /// 助记码
        /// </summary>
        [StringLength(50)]
        public string? MnemonicCode { get; set; }

        /// <summary>
        /// 供应商属性
        /// </summary>
        [StringLength(100)]
        public string? SupplierAttribute { get; set; }

        /// <summary>
        /// 省份
        /// </summary>
        [StringLength(50)]
        public string? Province { get; set; }

        /// <summary>
        /// 城市
        /// </summary>
        public string? City { get; set; }

        /// <summary>
        /// 区县
        /// </summary>
        [StringLength(50)]
        public string? District { get; set; }

        /// <summary>
        /// 详细地址
        /// </summary>
        [StringLength(500)]
        public string? DetailedAddress { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(1000)]
        public string? Remarks { get; set; }
    }
}